package york.Game.Steering.BehaviorTypes;

import york.Game.Vector2D;
import york.Game.Steering.SteeringBehavior;
import york.Game.Unit.SmartUnit;

public class BasicWander extends SteeringBehavior {
	public void doWork(SmartUnit arg0,double dt) {
		arg0.setDest(NextLoc(arg0.getPosition()));
	}
	public Vector2D NextLoc(Vector2D a_Vec) {
		double xdir = 10 * (generator.nextDouble() * 2 - 1);
		double ydir = 10 * (generator.nextDouble() * 2 - 1);
		return new Vector2D(a_Vec.x + xdir,a_Vec.y + ydir);
	}

}
